<?php
/**
 * Framework.php is the core of WP Framework which defines the main class
 * and core functions.
 *
 * @package WordPress
 * @subpackage WP_Framework
 */
 
// WP Framework Includes
include ( THEMELIB . '/core/hooks.php' ); // Framework hooks
include ( THEMELIB . '/core/semantic-classes.php' ); // Semantic Classes
include ( THEMELIB . '/custom/custom-functions.php' ); // User's custom functions

/**
 * WPFramework - Main Class sets up Framework enviroment
 * 
 * @since - 0.1
 */
class WPFramework
{
	/**
	 * init() - Class constructor
	 *
	 * @since - 0.1
	 */
	function init()
	{
		/* Remove Generator Link - Credits: (http://www.plaintxt.org) */
		function remove_generator_link() { return ''; }
		add_filter( 'the_generator', 'remove_generator_link', 1 );
		
		/* Register Widgets */
		if ( function_exists( 'register_sidebars' ) ) {
			register_sidebars( 1, array(
				'name' => 'Secondary',
				'before_widget' => '<div id="%1$s" class="widget %2$s">',
				'after_widget' => '</div>',
				'before_title' => '<h3 class="widget-title">',
				'after_title' => '</h3>',
			)); /* register_sidebar() */
		} /* if ( function_exists( 'register_sidebars' ) ) */
	} /* function init() */
} /* class WPFramework */

/**
 * wpframework_credits() - Echos credits link
 *
 * @since - 0.1
 * @filterable
 */
function wpframework_credits( $sep = '&mdash;' ) {
	$credits = 'Built on <a href="http://wpframework.com">WP Framework</a>'. $sep .'Powered by <a href="http://wordpress.org">WordPress</a>';
	echo apply_filters( 'wpframework_credits', $credits );
}

?>